<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Protecting archives from damage</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY>

<P class="title"><A NAME="HELPArcRecovery"></A>Protecting archives
from damage<hr></P>

<P><A HREF="HELPRARVersusZIP.htm">RAR archive format</A> supports
a special type of redundant data called the <I>recovery record</I>.
Presence of recovery record makes an archive larger, but allows to
repair it even in case of physical data damage due to disk failure
or data loss of other kind, provided that the damage is not too severe.
Such damage recovery can be done with <A HREF="HELPCommandsRepair.htm">
Repair archive</A> command. ZIP archive format does not support the recovery
record.</P>

<P>Set "Add recovery record" option in <a href="HELPGetArcGeneral.htm#RR">Archive
name and parameters dialog</a> to add the recovery record to archive.
Another approach is to enable "Add recovery record" option in the default
<A HREF="HELPProfiles.htm">compression profile</A>. In this case
the recovery record will be added to archives after any archive
modification.</P>

<p>If you need to add the recovery record in 
<A HREF="HELPCommandLineSyntax.htm">the command line mode</A>,
please read descriptions of <A HREF="HELPCmdRR.htm">rr[N] command</A>
and <A HREF="HELPSwRR.htm">-rr[N] switch</A>, which can be used for this
purpose.</p>

<p><a href="HELPRAR5Format.htm">RAR 5.0 archive format</a> recovery record
uses Reed-Solomon error correction codes. In case of a single continuous
damage, typically it is possible to restore slightly less data than recovery
record size. Recoverable data size can be lower for multiple damages.</p>

<p>You can specify the recovery record size in
<A HREF="HELPGetArcAdvanced.htm">Advanced options</A> of "Archive name
and parameters" dialog as a percent of archive size. Also it can be set
in <A HREF="HELPCommandsProtect.htm">Protect archive</A> command.
Larger recovery record allows to restore a larger damaged area,
but increases the archive size more and is processed slower.
Usually 3 - 10% of archive size is a reasonable choice.
Due to service data overhead the actual resulting recovery record size only
approximately matches the user defined percent and difference is larger
for smaller archives.</p>

<P>To repair a corrupt archive containing the recovery record in WinRAR
shell mode, apply "Repair" command to it. In the command line use
<A HREF="HELPCmdR.htm">command "r"</A>. The repaired archive will be given
the name <I>fixed.arcname.rar</I>, where 'arcname' is the original damaged
archive name. If corrupt archive does not contain the recovery record
or if archive is not completely recovered due to a major damage,
the second stage is performed. During this stage only the archive structure
is reconstructed and it is impossible to recover files failing the checksum
validation, but it is still possible to recover undamaged files,
which were inaccessible due to corrupt archive structure. This is useful
mostly for non-solid archives. This stage is not performed for archives
with encrypted file names, which can be repaired only if recovery record
is present.</P>

<P>When the second stage is completed, the reconstructed archive will be
saved as <I>rebuilt.arcname.rar</I>, where 'arcname' is the original archive
name.</P>

<p>If a recovery record is partially broken, its remaining valid data still
can be utilized to repair files. Repair command does not fix broken blocks
in recovery record itself, only file data is corrected. After successful
archive repair, you may need to create a new recovery record for rescued
files.</p>

<p>While the recovery record improves chances to repair damaged archives,
it does not guarantee the successful recovery. Consider combining
the recovery record feature with making multiple archive copies to
different media for important data.</p>

</BODY>
</HTML>
